<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <title>智能防疫管理</title>
    <link rel="stylesheet" href="./css/weui.min.css">
    <link rel="stylesheet" href="./css/animate.css">
    <link rel="stylesheet" href="./css/index.css">
    <link rel="stylesheet" href="./css/example.css">
</head>
<body>
  <div class="weui-toptips weui-toptips_warn js_tooltips" id='topTips'>请选择深圳市</div>
  <div class="weui-toptips weui-toptips_warn js_tooltips" id='selectTip'>请在地图中选择警情位置</div>
  <div class="weui-toptips weui-toptips_warn js_tooltips" id='navErrTip'>无法到达，请重新选点</div>
  <div class="weui-toptips weui-toptips_success js_tooltips" id='navOkTip'>路径规划成功</div>
  <div class="weui-toptips weui-toptips_warn js_tooltips" id='selectPosTip'>请在地图中选择终点</div>
    <div id="container" class="container">
    </div>
    <script type="text/html" id="tpl_visitorRegister">
        <div class="page">
            <header>
                <div class="header">
                    <a class="back-btn" onclick="javascript:history.back(-1)"></a>
                    <h2>访客登记</h2>
                </div>
            </header>
            <main>
              <div class="">
                <div class="weui-cells__tips wow fadeInDown">郑重提醒：在疫情期间，身处本市的每位市民，必须如实填报个人信息，如故意瞒报错报，将依法追究相关法律责任。</div>
                <div class="weui-cells__tips wow fadeInDown" id="sign" style="text-align: right;">——深圳市公安局</div>
          
                <label for="weuiAgree" class="weui-agree wow fadeInDown">
                  <span class="weui-agree__text">
                    带 <span class="red-text">*</span> 为必填项
                  </span>
                </label>
          
                <div class="weui-cells_form wow fadeInUp" id="form" data-wow-delay='0.2s'>
                  <div class="weui-panel weui-cells">
                    <div class="weui-panel__bd">
          
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>到访单位</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" required="" placeholder="请输入到访单位名称" id="company_name">
                        </div>
                      </div>
          
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>姓名</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" required="" placeholder="请输入姓名" id="full_name">
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>性别</label>
                        </div>
                        <div class="weui-cell__bd weui-cells_checkbox">
                          <label class="weui-cell weui-cell_active weui-check__label" for="sex1">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="sex" id="sex1" value="1" checked="checked">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>男</p>
                            </div>
                          </label>
                          <label class="weui-cell weui-cell_active weui-check__label" for="sex0">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="sex" id="sex0" value="0">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>女</p>
                            </div>
                          </label>
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>证件类型</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" id="id_type" placeholder="请选择" emptytips="请选择" type="text" value="身份证">
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>证件号码</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" type="text" required="" pattern="" placeholder="请输入证件号码" emptytips="请输入身份证号码" notmatchtips="请输入正确的证件号码" id="id_card">
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>手机号</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" type="tel" required="" pattern="REG_PHONE" placeholder="请输入手机号" emptytips="请输入手机号" notmatchtips="请输入正确的手机号" id="phone">
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>身体状况</label>
                        </div>
                        <div class="weui-cell__bd weui-cells_checkbox">
                          <label class="weui-cell weui-cell_active weui-check__label" for="healthy0">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="healthy" id="healthy0" value="健康正常" checked="checked">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>健康正常</p>
                            </div>
                          </label>
                          <label class="weui-cell weui-cell_active weui-check__label" for="healthy1">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="healthy" id="healthy1" value="有咳嗽等不适症状">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>有咳嗽等不适症状</p>
                            </div>
                          </label>
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>体温</label>
                        </div>
                        <div class="weui-cell__bd weui-cells_checkbox">
                          <label class="weui-cell weui-cell_active weui-check__label" for="temperature0">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="temperature" id="temperature0" value="0" checked="checked">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>37.3℃以下</p>
                            </div>
                          </label>
                          <label class="weui-cell weui-cell_active weui-check__label" for="temperature1">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="temperature" id="temperature1" value="&gt;1">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>37.3℃及以上</p>
                            </div>
                          </label>
                        </div>
                      </div>
                    </div>
                  </div>
          
                  <div class="weui-panel">
                    <div class="weui-panel__bd">
          
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>居住区域</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" id="home_area" required="" placeholder="请选择" emptytips="请选择" type="text" value="">
                        </div>
                      </div>
                      <div class="weui-cell sz_show">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>居住社区</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" id="home_community" placeholder="区-街道-社区" emptytips="居住社区" type="text" value="">
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>详细地址</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" required="" placeholder="请输入详细地址" id="home_addr">
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>工作单位</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" required="" placeholder="请输入工作单位" id="work_place">
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>1月1日后<br>是否离开<br>过本市</label>
                        </div>
                        <div class="weui-cell__bd weui-cells_checkbox">
                          <label class="weui-cell weui-cell_active weui-check__label" for="is_leave1">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="is_leave" id="is_leave1" value="1" checked="checked">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>是</p>
                            </div>
                          </label>
                          <label class="weui-cell weui-cell_active weui-check__label" for="is_leave0">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="is_leave" id="is_leave0" value="0">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>否</p>
                            </div>
                          </label>
                        </div>
                      </div>
                      <div class="weui-cell" id="from_addr_box">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>来自区域</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" id="from_addr" required="" placeholder="请选择" emptytips="请选择" type="text" value="">
                        </div>
                      </div>
                      <div class="weui-cell" id="arrive_date_box">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>到达<br>(或拟到达)<br>本市日期</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" required="" type="text" placeholder="请选择到本市日期" id="arrive_date">
                        </div>
                      </div>
          
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label"><span class="red-text">*</span>是否隔离</label>
                        </div>
                        <div class="weui-cell__bd weui-cells_checkbox">
                          <label class="weui-cell weui-cell_active weui-check__label" for="isolation0">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="isolation" id="isolation0" value="0" checked="checked">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>否</p>
                            </div>
                          </label>
                          <label class="weui-cell weui-cell_active weui-check__label" for="isolation1">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="isolation" id="isolation1" value="1">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>居家隔离</p>
                            </div>
                          </label>
                          <label class="weui-cell weui-cell_active weui-check__label" for="isolation2">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="isolation" id="isolation2" value="2">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>集中隔离</p>
                            </div>
                          </label>
                          <label class="weui-cell weui-cell_active weui-check__label" for="isolation3">
                            <div class="weui-cell__hd">
                              <input type="radio" class="weui-check" name="isolation" id="isolation3" value="3">
                              <span class="weui-icon-checked"></span>
                            </div>
                            <div class="weui-cell__bd">
                              <p>解除隔离</p>
                            </div>
                          </label>
                        </div>
                      </div>
          
                    </div>
                  </div>
          
                  <div class="weui-panel">
                    <div class="weui-panel__bd">
          
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label">紧急联系人</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" placeholder="请输入紧急联系人姓名" id="contact_name">
                        </div>
                      </div>
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label">紧急联系电话</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" type="tel" pattern="REG_PHONE" placeholder="请输入紧急联系人电话" emptytips="请输入紧急联系人电话" notmatchtips="请输入正确的手机号" id="contact_phone">
                        </div>
                      </div>
          
                    </div>
                  </div>
          
                  <div id="rel_box" style="margin-top: 8px"></div>
                  
                  <div class="weui-panel" id="del_rel_box" style="display: none;">
                    <div class="weui-panel__bd">
                      <a class="weui-btn weui-btn_block weui-btn_warn" href="javascript:" id="del_rel">删除同行人</a>
                    </div>
                  </div>
                  <div class="weui-panel">
                    <div class="weui-panel__bd">
                      <a class="weui-btn weui-btn_block weui-btn_default" href="javascript:" id="add_rel">添加同行人</a>
                    </div>
                  </div>
          
                  <div class="weui-panel">
                    <div class="weui-panel__bd">
          
                      <div class="weui-cell">
                        <div class="weui-cell__hd">
                          <label class="weui-label">备注</label>
                        </div>
                        <div class="weui-cell__bd">
                          <input class="weui-input" placeholder="备注" id="contact_remark">
                        </div>
                      </div>
          
                    </div>
                  </div>
          
                </div>
                <label for="weuiAgree" class="weui-agree">
                  <span class="weui-agree__text">
                    带 <span class="red-text">*</span> 为必填项
                  </span>
                </label>
                <div class="weui-btn-area">
                  <a class="weui-btn weui-btn_block submit-btn js-item" href="javascript:" id="submit" data-id='success'>提交</a>
                </div>
              </div>
            </main>
        </div>
    </script>
<script type="text/html" id='tpl_home'>
<div class='page'>
    <div class='page__hd'>
        <header>
            <div class="header">
                <h2>园区楼宇防疫保护系统</h2>
            </div>
        </header>
      
    </div>
    <div class='page__bd' style=''>
        <h1 class='wow fadeInDown'>西北三航大厦防疫保护系统</h1>
        <div class='home_entrys'>
            <a href="javascript:;" class="weui-btn weui-btn_default js-item wow fadeInUp" data-id="visitorRegister">
                访问预约登记
            </a>
            <a href="javascript:;" class="weui-btn weui-btn_default js-item wow fadeInUp" data-id="login">
                巡查辅助入口
            </a>
        </div>
        <div class="weui-footer">
            <p class="weui-footer__links">
                <a href="https://www.esmap.cn" class="weui-footer__link">ESMap官方网站</a>
            </p>
            <p class="weui-footer__text">Copyright &copy; 2020 ESMap</p>
        </div>
    </div>
</div>
</script>
<script type="text/html" id="tpl_map">
        <div class="page">
            <div class='page__hd'>
                <header>
                    <div class="header">
                        <a href="javascript:" data-id='home' id='backtohome' class="back-btn js-item"></a>
                        <!-- <a class="back-btn" onclick="javascript:history.back(-1)"></a> -->
                        <h2>西北三航大厦</h2>
                    </div>
                </header>
              
            </div>
            <div id='fnum_toast' style='display:none'> 
              <div class="weui-mask_transparent"></div>
              <div class="weui-toast">
                  <!-- <i class="weui-icon-success-no-circle weui-icon_toast"></i> -->
                  <p id='fnumname' class="weui-toast__content">已完成</p>
              </div>
            </div>
            <div class='page__bd' style='height:100%;'>
                
                <div id='map-container' class="">
                </div> 
                <div class="pannel functions">
                 <div class='notify'>
                     <svg t="1582790875520" class="icon" viewBox="0 0 1181 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="27574" width="64" height="64"><path d="M1025.732923 514.953846l130.756923 34.973539a33.752615 33.752615 0 0 1 24.733539 37.179077l-0.827077 4.174769a33.792 33.792 0 0 1-41.393231 23.867077l-130.756923-34.973539a33.752615 33.752615 0 0 1-24.733539-37.179077l0.827077-4.174769a33.792 33.792 0 0 1 41.353846-23.867077zM930.146462 4.529231c14.926769 8.585846 20.795077 26.860308 14.296615 42.299077l-1.929846 3.859692-67.623385 116.972308a33.831385 33.831385 0 0 1-42.377846 14.25723l-3.820308-1.929846a33.752615 33.752615 0 0 1-14.296615-42.299077l1.929846-3.820307 67.623385-116.972308a33.831385 33.831385 0 0 1 46.198154-12.366769z m-51.121231 355.012923c87.906462 204.484923 102.478769 411.766154 30.995692 440.910769-92.553846 37.651692-143.399385-130.244923-415.271385-101.809231-39.502769 4.056615-66.678154 29.774769-53.878153 61.282462l4.883692 11.736615c12.8 30.208 38.557538 88.142769 47.222154 107.953231 10.043077 23.000615 45.174154 28.750769 53.720615 48.482462 7.955692 18.235077 1.772308 41.432615-24.221538 51.318153l-113.900308 43.244308c-20.007385 7.601231-47.537231-18.235077-59.707077-46.08l-64.315077-147.692308c-13.745231-31.350154-52.302769-2.048-89.127384-51.515077l-26.939077 8.900924c-6.183385 2.087385-11.815385 4.096-14.769231 5.316923-51.593846 20.913231-122.171077-28.987077-143.753846-79.084308-21.582769-50.176-8.546462-133.947077 43.086769-154.978462C650.24 314.919385 456.231385 77.705846 577.851077 28.238769 649.452308-0.787692 791.000615 154.899692 879.064615 359.581538zM614.518154 143.36l-1.260308 0.275692c-15.911385 6.498462-24.497231 151.788308 43.874462 310.744616 68.332308 159.074462 175.340308 243.278769 191.251692 236.898461 15.911385-6.498462 21.858462-134.419692-46.552615-293.376-65.063385-151.355077-162.855385-250.840615-185.737847-254.424615l-1.575384-0.118154z m525.981538 108.701538a33.752615 33.752615 0 0 1-12.563692 42.771693l-3.741538 2.048-122.683077 57.107692a33.831385 33.831385 0 0 1-32.374154-59.155692l3.741538-2.008616 122.722462-57.107692c16.935385-7.876923 37.021538-0.590769 44.898461 16.305231z" p-id="27575"></path></svg>
                 </div>
                </div>
                <div class="pannel map-control">
                     <div class="weui-cells">
                         <div class="weui-cell layers-toggle">
                             <div class="layers">
                                 <div class="layer-multy">
                                     <svg class="icon" aria-hidden="true">
                                         <use xlink:href="#icon-layers"></use>
                                      </svg> 
                                      <span class="layer-des">多层</span>
                                 </div>
                                 <div class="layer-single">
                                     <svg t="1582769637593" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18354" width="64" height="64"><path d="M993.622303 209.223676l-460.79999-204.799996a51.199999 51.199999 0 0 0-41.59488 0l-460.79999 204.799996a51.199999 51.199999 0 0 0 0 93.593598l460.79999 204.799996a51.384319 51.384319 0 0 0 41.59488 0l460.79999-204.799996a51.199999 51.199999 0 0 0 0-93.593598z" p-id="18355" data-spm-anchor-id="a313x.7781069.0.i11" class="selected" fill="#1296db"></path><path d="M512.035113 767.999985a51.199999 51.199999 0 0 1-20.7872-4.4032l-460.79999-204.799996a51.210239 51.210239 0 0 1 41.594879-93.593598L512.035113 660.766707l439.992311-195.543036a51.210239 51.210239 0 0 1 41.594879 93.593598l-460.79999 204.799996A51.199999 51.199999 0 0 1 512.035113 767.999985z" p-id="18356" data-spm-anchor-id="a313x.7781069.0.i13" class="" fill="#ffffff"></path><path d="M512.035113 1023.99998a51.199999 51.199999 0 0 1-20.7872-4.4032l-460.79999-204.799996a51.210239 51.210239 0 0 1 41.594879-93.593598L512.035113 916.766702l439.992311-195.543036a51.210239 51.210239 0 0 1 41.594879 93.593598l-460.79999 204.799996A51.199999 51.199999 0 0 1 512.035113 1023.99998z" p-id="18357" data-spm-anchor-id="a313x.7781069.0.i14" class="" fill="#ffffff"></path></svg>
                                 <span class="layer-des">单层</span>
                               </div>
                             </div>
                         </div>
                         <div class="weui-cell fnums-toggle">
                         </div>
                         <div class="weui-cell map-scale">
                             <div class="map-scale-in">
                                 +
                             </div>
                             <div class="map-scale-out">
                                 -
                             </div>
                         </div>
                         <div class="weui-cell my-location">
                             <div>
                                 <svg class="icon" aria-hidden="true">
                                     <use xlink:href="#icon-locate"></use>
                                  </svg> 
                             </div>
                         </div>
                         <div class='weui-cell menu wow fadeInUp' id='mainPanel'>
                            <a href="javascript:;" class="weui-btn weui-btn_default" id='close-inspection'>
                              关闭巡查指引
                            </a>
                            <a href="javascript:;" class="weui-btn weui-btn_default" id='inspection'>
                                巡查指引
                            </a>
                            <a id='report' class="weui-btn weui-btn_default">
                              警情上报
                            </a>
                            <!-- <a href="javascript:;" id='report' class="weui-btn weui-btn_default js-item" data-id='report'>
                              警情上报
                            </a> -->
                         </div>
                         <div class='weui-cell menu' id='selectPanel'>
                            <a class="weui-btn weui-btn_default" id='repick'>
                                重新选择
                            </a>
                            <a id='report-confirm' class="weui-btn weui-btn_default">
                              确定
                            </a>
                       </div>
                     </div>
                </div>
                <div id='dialogs'>
                    <!-- <div class="js_dialog" id="menu_dialog" style="display: none;">
                     <div class="weui-mask"></div>
                         <div id="js_dialog_1" class="weui-half-screen-dialog">
                             <div class="weui-half-screen-dialog__hd">
                               <div class="weui-half-screen-dialog__hd__side">
                                 <button class="weui-icon-btn">关闭<i class="weui-icon-close-thin"></i></button>
                               </div>
                               <div class="weui-half-screen-dialog__hd__main">
                                 <strong class="weui-half-screen-dialog__title">辅助巡查</strong>
                               </div>
                             </div>
                             <div class="weui-half-screen-dialog__bd">
                                <a href="javascript:;" class="weui-btn weui-btn_default js-item" data-id='report'>
                                    警情上报
                                </a>
                                 <a href="javascript:;" class="weui-btn weui-btn_default" id='inspection'>
                                     巡查指引
                                 </a>
                             </div>
                         </div>
                     </div> -->
                     <div class="js_dialog" id="notify_dialog" style="display: none;">
                        <div class="weui-mask"></div>
                            <div id="js_dialog_2" class="weui-half-screen-dialog">
                                <div class="weui-half-screen-dialog__hd">
                                  <div class="weui-half-screen-dialog__hd__side">
                                    <button class="weui-icon-btn">关闭<i class="weui-icon-close-thin"></i></button>
                                  </div>
                                  <div class="weui-half-screen-dialog__hd__main">
                                    <strong class="weui-half-screen-dialog__title">通知</strong>
                                  </div>
                                </div>
                                <div class="weui-half-screen-dialog__bd">
                                  <p>
                                    <i class="weui-icon-info weui-icon_msg"></i>现已进入疫情访客关键期，为了维护本园区的健康安全，请巡检人员切实做好防疫排查工作！

                                    <span class='department'>三航科技大厦管理处 2020年2月28日</span>
                                  </p>
                                  <p>
                                    <i class="weui-icon-info weui-icon_msg"></i>巡检过程中如发现任何可疑情况，请及时拍照、拍视频上传，等待工作人员进行处理。
                                    <span class='department'>三航科技大厦管理处 2020年2月28日</span>
                                  </p>
                                </div>
                            </div>
                        </div>
                 </div>
                 <div class="weui-mask main"></div>
            </div>
        </div>
    </script>
<script type="text/html" id='tpl_success'>
    <div class="page">
        <div class="weui-msg">
            <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
            <div class="weui-msg__text-area">
                <h2 class="weui-msg__title">操作成功</h2>
                <p class="weui-msg__desc">
                    您的访问预约申请已提交，请耐心等待审核结果！
                </p>
                    <div class='success_qrcode'>
                        <img style='width: 100%;' src="./assets/images/qrcode.png" alt="">
                    </div>
                    <div class="weui-msg__tips-area">
                        <p class="weui-msg__tips">请保存二维码，审核通过后凭此二维码进入园区</p>
                      </div>
            </div>
            <div class="weui-msg__opr-area">
                <p class="weui-btn-area">
                    <a href="javascript:" data-id='home' id='backtohome' class="weui-btn weui-btn_primary js-item">返回首页</a>
                </p>
            </div>
            <!-- <div class="weui-msg__tips-area">
              <p class="weui-msg__tips">请保存二维码，方便向工作人员展示</p>
            </div> -->
            <div class="weui-msg__extra-area">
                <div class="weui-footer">
                    <p class="weui-footer__links">
                        <a href="https://www.esmap.cn" class="weui-footer__link">ESMap官方网站</a>
                    </p>
                    <p class="weui-footer__text">Copyright &copy; 2020 ESMap</p>
                </div>
            </div>
        </div>
    </div>
</script>
<script type="text/html" id='tpl_login'>
    <div class='page'>
        <div class='page__hd'>
            <header>
                <div class="header">
                    <a class="back-btn" onclick="javascript:history.back(-1)"></a>
                    <h2>巡查辅助</h2>
                </div>
            </header>
          
        </div>
        <div class='page__bd' style=''>
            <h1 class='wow fadeInDown'>西北三航大厦巡查辅助系统</h1>
            <div class='home_entrys'>
                <div class='weui-cells weui-cells_form'>
                    <div class='weui-cell input wow fadeInUp'>
                        <div class='weui-cell__bd'>
                            <input id='js_input' class='weui-input' placeholder='请输入巡查账号'>
                        </div>
                    </div>
                    <div class='weui-cell input wow fadeInUp'>
                        <div class='weui-cell__bd'>
                            <input id='js_input' class='weui-input' placeholder='请输入密码'>
                        </div>
                    </div>
                    <div class='weui-cell wow fadeInUp'>
                        <div class='weui-cell__bd'>
                            <a href="javascript:;" class="weui-btn weui-btn_default js-item" data-id="map">
                                登录
                            </a>
                        </div>
                    </div>
                  
                </div>
            </div>
        </div>
    </div>
    </script>
<script type="text/html" id='tpl_report'>
<div class='page'>
    <div class='page__hd'>
        <header>
            <div class="header">
                <a class="back-btn" onclick="javascript:history.back(-1)"></a>
                <h2>警情上报</h2>
            </div>
        </header>
    </div>
<div class='page__bd'>
    <main>
        <div class="">
            <div class="photo-upload uploads wow fadeInUp" data-wow-delay='0s'>
                <h4> <span class="upload-icons"></span> 照片上传</h4>
                <hr>
                <!-- <a class="upload-items" href="#" type="upload"><img src="./assets/icons/add.png" alt=""></a> -->
                <a class="upload-items" href="#" type="upload">
                    <input class="upload-input" href="#" type="file"><img src="./assets/icons/add.png" alt=""></a>
                <!-- <img src="./assets/icons/add.png" alt=""> -->
            </div>
            <div class="voice-upload uploads wow fadeInUp" data-wow-delay='0.3s'>
                <h4> <span class="upload-icons"></span>录音上传(长按上传语音)</h4>
                <hr>
                <div id="record-btn">
                    长按录音
                </div>
            </div>
            <div class="video-upload uploads wow fadeInUp" data-wow-delay='0.6s'>
                 <h4> <span class="upload-icons"></span>视频上传</h4>
                 <hr>
                 <a class="upload-items" href="#">
                    <input class="upload-input" href="#" type="file"> 
                    <img src="./assets/icons/upload-video.png" alt="">
                </a>
            </div>
            <div class="info-upload uploads wow fadeInUp" data-wow-delay='0.9s'>
                <h4> <span class="upload-icons"></span>添加描述意见</h4>
                <div>
                    <textarea class="des-box" name="" id="" cols="30" rows="10"></textarea>
                </div>
            </div>
            <div class="upload-btn-box">
                <a href="javascript:;" class="upload-btn weui-btn weui-btn_default js-item" data-id='rptsuccess'>
                    一键上报
                </a>
            </div>
        </div>
    </main>
</div>
</div>
</script>
<script type="text/html" id='tpl_rptsuccess'>
    <div class="page">
        <div class="weui-msg">
            <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
            <div class="weui-msg__text-area">
                <h2 class="weui-msg__title">上报成功</h2>
                <p class="weui-msg__desc">
                   警情上报成功，已移交管理员处置
                </p>
            </div>
            <div class="weui-msg__opr-area">
                <p class="weui-btn-area">
                    <a href="javascript:" data-id='map' id='back'  class="weui-btn weui-btn_primary js-item">返回</a>
                </p>
            </div>
            <!-- <div class="weui-msg__tips-area">
              <p class="weui-msg__tips">请保存二维码，方便向工作人员展示</p>
            </div> -->
            <div class="weui-msg__extra-area">
                <div class="weui-footer">
                    <p class="weui-footer__links">
                        <a href="https://www.esmap.cn" class="weui-footer__link">ESMap官方网站</a>
                    </p>
                    <p class="weui-footer__text">Copyright &copy; 2020 ESMap</p>
                </div>
            </div>
        </div>
    </div>
</script>
    <script src="./lib/jquery.min.js"></script>
    <script src="./lib/wow.min.js"></script>
    <script src="./assets/font_15gqvotzpc/iconfont.js"></script>
    <script src="./assets/font_5t3sf2ll1nv/iconfont.js"></script>
    <script src="./lib/picker.min.js"></script>
    <script src="./lib/pageRoute.js"></script>
    <script src="./lib/esmap-1.6.min.js"></script>
    <script type="text/javascript" src="./lib/zepto.min.js"></script>
    <script type="text/javascript" src="./lib/weui.min.js"></script>
    <script type="text/javascript" src="./lib/jweixin-1.6.0.js"></script>
    <script type="text/javascript" src="./lib/util.js"></script>
    <script type="text/javascript" src="./lib/citys.js"></script>
    <script type="text/javascript" src="./lib/sz_street.js"></script>
    <script type="text/javascript" src="./lib/xss.min.js"></script>
    <script type="text/javascript" src="./lib/home.js"></script>
    <script type="text/javascript">
        var map;
        var picker;
        var stack = [];
        var timeOutEvent=0;
        var navi;
        var myLocationMarker = null;
        var pickedFnum = 1;
        var pickedCoord = null;
        var pickedHeight = 1;
        var addedLocation = false;
        var enablePick = false;
        var myLocation = {
                x:12629990.0572413,
                y:2580072.9431645,
                fnum:3
              }
            $(function(){
                if(location.hash == '#map'){
                    initMap(1);
                }
                 $(window).on('hashchange', function () {
                    if( location.hash == '#map'&&!map){
                        initMap(1);
                    }
                    bindEvents();
                 })
                new WOW().init();
                bindEvents();
            });
            function bindEvents(){
                var winH = $(window).height();
                var categorySpace = 10;
                $('.js-item').on('click', function(){
                    var id = $(this).data('id');
                    window.pageManager.go(id);
                });
                $('.js_category').on('click', function(){
                    var $this = $(this),
                        $inner = $this.next('.js_categoryInner'),
                        $page = $this.parents('.page'),
                        $parent = $(this).parent('li');
                    var innerH = $inner.data('height');
                    bear = $page;
          
                    if(!innerH){
                        $inner.css('height', 'auto');
                        innerH = $inner.height();
                        $inner.removeAttr('style');
                        $inner.data('height', innerH);
                    }
          
                    if($parent.hasClass('js_show')){
                        $parent.removeClass('js_show');
                    }else{
                        $parent.siblings().removeClass('js_show');
          
                        $parent.addClass('js_show');
                        if(this.offsetTop + this.offsetHeight + innerH > $page.scrollTop() + winH){
                            var scrollTop = this.offsetTop + this.offsetHeight + innerH - winH + categorySpace;
          
                            if(scrollTop > this.offsetTop){
                                scrollTop = this.offsetTop - categorySpace;
                            }
          
                            $page.scrollTop(scrollTop);
                        }
                    }
                });
                $("#record-btn").on({
                    touchstart: function(e){
                        timeOutEvent = setTimeout("longPress()",500);
                        e.preventDefault();
                    },
                    touchmove: function(){
                                clearTimeout(timeOutEvent); 
                            timeOutEvent = 0; 
                    },
                    touchend: function(){
                        clearTimeout(timeOutEvent);
                        $("#record-btn").text('长按录音')
                        $('#record-btn').removeClass('active')
                        if(timeOutEvent!=0){ 
                            alert("你这是点击，不是长按"); 
                        } 
                        return false; 
                    }
                })
                $('input ,textarea').on('blur',function(){
                  window.scroll(0,0)
                })
                $('select').on('change',function(){
                  window.scroll(0,0)
                })
        }
        function showInfo(data) {
                //距终点的距离
                var distance = data.remain;
                //路线提示信息
                var info = navi.naviDescriptions[data.index];
                var f = info[0] + parseInt(data.distanceToNext) + info[2];
                // console.info(f)
                //普通人每分钟走80米。
                var time = distance / 80;
                var m = parseInt(time);
                var s = Math.floor((time % 1) * 60);
                $('#description').html(
                    '<p>距终点：' +
                        distance.toFixed(1) +
                        ' 米</p><p>大约需要：  ' +
                        m +
                        '  分钟   ' +
                        s +
                        '   秒</p><p>路线提示：' +
                        f +
                        ' </p>'
                );
            }
        function initMap(focusFloor){
                 map = new esmap.ESMap({
                        container: $('#map-container')[0], // 渲染dom
                        mapDataSrc: './data', //地图数据位置
                        focusFloor:focusFloor,
                        modelLines:true,
                        mapThemeSrc: './data/themes', //主题数据位置
                    })
                    map.showCompass = true;
                    map.openMapById('50021');
                    map.on('mapClickNode',function(e){
                      var name = e.name || '位置点';
                      if(e.hitCoord){
                        pickedCoord = e.hitCoord
                      }
                      switch(e.nodeType){
                        case esmap.ESNodeType.FLOOR:
                          pickedFnum = e.floor;
                          break;
                        case esmap.ESNodeType.MODEL:
                          pickedHeight = e.RoomHigh;
                          pickedFnum = e.FloorNum;
                          break;
                        case esmap.ESNodeType.LABEL:
                        case esmap.ESNodeType.FACILITY:
                          pickedHeight = e.data_.Height;
                          pickedFnum = e.FloorNum;
                          break;
                      }
                      pickedFnum&&pickedCoord&&addMarkerToMap();
                        pickedFnum = null;
                    }) 
                    map.on('loadComplete',function(){
                        initFnumPicker();
                        bindMapEvents()
                        createNavi();
                    })
        }
        function addMarkerToMap(){
          if(!enablePick)return;
          // if(addedLocation||!enablePick)return;  
              var fnums = map.floorNums;
              for (var i = 0; i < fnums.length; i++) {
                  var fl = map.getFloor(fnums[i]);
                  fl.removeLayersByNames('marker'); //删除一个或者多个name的图层。
              }
               var floorLayer = map.getFloor(pickedFnum)
                var layer =floorLayer.getOrCreateLayerByName('marker',esmap.ESLayerType.IMAGE_MARKER);
                var im = new esmap.ESImageMarker({
                  x:pickedCoord.x,
                  y:pickedCoord.y,   //如果不添加x和y，则默认坐标在地图中心。
                  url: './assets/icons/location.png',  //图片标注的图片地址
                  size: 64,   			//图片大小 或者 size:{w:32,h:64},
                  spritify:true,			//跟随地图缩放变化大小，默认为true，可选参数
                  height:1,    			//距离地面高度
                  showLevel: 20,  		//地图缩放等级达到多少时隐藏,可选参数
                  seeThrough: true,		//是否可以穿透楼层一直显示,可选参数
                  callback:function(){
                    // myLocationMarker.alwaysShow();
                    // myLocationMarker.jump({
                    //   times:5
                    // });
                  },
                  //angle:30,  	//如果设置了就是固定marker角度，与地图一起旋转。(size需要重新设置)
                  id: 2020,   			//id，可自定义
                  name: 'myMarker'   		//name可自定义
                });
                layer.addMarker(im)
                floorLayer.addLayer(layer);
                addedLocation = true;
                enablePick = false;
                // pickedFnum = null;
                pickedHeight = 1;
                // pickedCoord = null;
        }
        function longPress(){ 
            timeOutEvent = 0; 
            $('#record-btn').addClass('active')
            $("#record-btn").text('录音中...');
        }
        function bindMapEvents(){
            $('.layers-toggle').click(function(){
                $('.layer-single').toggle();
                $('.layer-multy').toggle();
                if(map.visibleFloorNums.length!=map.floorNums.length){
                    map.visibleFloorNums = map.floorNums
                }else{
                    map.visibleFloorNums = [map.focusFloorNum]
                }
            })
            $('.map-scale-in').click(function(){
                map.scaleLevelIn();
            })
            $('.map-scale-out').click(function(){
                map.scaleLevelOut();
            })
            $('.notify').click(function(){
                $('#notify_dialog').fadeIn(200);
                $('#js_dialog_2').addClass('weui-half-screen-dialog_show');
            })
            $('.menus').click(function(){
                $('#menu_dialog').fadeIn(200);
                $('#js_dialog_1').addClass('weui-half-screen-dialog_show');
            })
            $('.weui-icon-btn').click(function(){
              $(this).parents('.js_dialog').fadeOut(200);
              $(this).parents('.weui-half-screen-dialog').removeClass('weui-half-screen-dialog_show');
            })
            $('#dialogs').on('click', '.weui-mask', function(){
                $(this).parents('.js_dialog').fadeOut(200);
                $(this).siblings('.weui-half-screen-dialog').removeClass('weui-half-screen-dialog_show');
            });
            $('#repick').click(function(){
              var fnums = map.floorNums;
              for (var i = 0; i < fnums.length; i++) {
                  var fl = map.getFloor(fnums[i]);
                  fl.removeLayersByNames('marker'); //删除一个或者多个name的图层。
              }
              enablePick = true;
              addedLocation = false;
            })
            $('#startAnimateNav').click(function(){
              if(!pickedCoord){
                $('#selectPosTip').fadeIn(200);
                setTimeout(function(){
                  $('#selectPosTip').fadeOut(200);
                },2000)
                return;
              }
              navi.setStartPoint({
                      x: myLocation.x,
                      y: myLocation.y,
                      showLevel: 18,
                      fnum: myLocation.fnum,
                      height: 1,
                      size:100,
                      url: './assets/icons/start.png',
                  });
              navi.setEndPoint({
                            x: pickedCoord.x,
                            y: pickedCoord.y,
                            showLevel: 18,
                            fnum: pickedFnum,
                            clip:'circle',
                            height: 1,
                            url: './assets/icons/end.png',
                            size: 100,
                      });
                  navi.drawNaviLine();
                if(navi.outcome){
                  $(this).hide();
                  $('#stopAnimateNav').show();
                  $('#description').fadeIn(3000)
                  navi.simulate();
                }
            })
            $('#stopAnimateNav').click(function(){
              $(this).hide();
              $('#startAnimateNav').show();
              navi.stop();
              navi.clearAll();
              $('#description').hide();
            })
            $('#startRealNav').click(function(){
              $('#iosDialog1').fadeIn(200);
            })
            $('#realNavClose').click(function(){
              $('#iosDialog1').fadeOut(200);
            })
            $('#report-confirm').click(function(){
              if(!addedLocation){
                //没有添加位置点
                $('#selectTip').fadeIn(200);
                  setTimeout(function(){
                    $('#selectTip').fadeOut(200);
                  },2000)
              }else{
                $('#selectPanel').css('bottom','-100px');
                $('#mainPanel').css('bottom','0');
                pageManager.go('report')
              }
            })
            $('#report').click(function(){
              if(navi.isSimulating){
                  clearInterval(this._moveToID);
                  navi.pause = true;
                  focusToMyLocation(6);
                  markMyLocation();
                  $('.weui-mask.main').fadeIn(200);
                  setTimeout(function(){
                    pageManager.go('report');
                    $('.weui-mask.main').fadeOut(200);
                  },2000)
              }else{
                enablePick = true;
                $('#selectPanel').css('bottom','0');
                $('#mainPanel').css('bottom','-95px');
                  $('#selectTip').fadeIn(200);
                  setTimeout(function(){
                    $('#selectTip').fadeOut(200);
                  },2000)
                // }else{
                //   pageManager.go('report');
                // }
              }
            })
            $(window).on('hashchange', function () {
              if(location.hash=='#map'){
                  if(navi&&navi.isSimulating&&navi.pause){
                    navi.pause = false;
                  }
              }
            })
            $('.my-location').click(function(){
              focusToMyLocation(5);
              markMyLocation();
            });
            $('#inspection').click(function(){
                $('.weui-icon-btn').trigger('click');
                focusToMyLocation(2);
                showRoutes();
                $(this).hide();
                $('#close-inspection').show();
            })
            $('#close-inspection').click(function(){
              $(this).hide();
              $('#inspection').show();
              navi.stop();
              navi.clearAll();
              var fl = map.getFloor(3);
              fl.removeLayersByNames('routes'); //删除一个或者多个name的图层。
              map.mapPicker.clickCompass()
            })
        }
        function createNavi() {
      if (map.naviData.length == 0) {
        console.warn("地图导航数据信息不存在！");
        return;
      }
  
      if (!navi) {
        //初始化导航对象
        navi = new esmap.ESNavigation({
          map: map,
          locationMarkerUrl: './assets/icons/pointer.png',
          locationMarkerSize: 150,
          audioPlay: false,
          followPosition:true,
          followAngle:true,
          tiltAngle:60,
          mode: 1,
          offsetHeight: 1,
          // 设置导航线的样式
          lineStyle: {
            color: '#58a2e4',
            //设置线为导航线样式
            lineType: esmap.ESLineType.ESARROW,
            lineWidth: 6,
            offsetHeight: 0.5,
            smooth: true,
            seeThrough: false,
            noAnimate: false
          }
        });
        navi.on('walking',function(data){
          myLocation.x = data.point.x;
          myLocation.y = data.point.y;
          showInfo(data);
        })
        navi.on('complete',function(){
          $('#description').html('');
          $('#description').fadeOut(200)
        })
        navi.on('checkStatus',function(status){
                    if(!status){
                        $('#navErrTip').fadeIn(200);
                       setTimeout(function(){
                        $('#navErrTip').fadeOut(200);
                       },2000)
                    }else{
                      
                      $('#navOkTip').fadeIn(200);
                       setTimeout(function(){
                        $('#navOkTip').fadeOut(200);
                       },2000)
                    }
                  })
      }
    }
    function markMyLocation(){
      if(!myLocationMarker){
                var floorLayer = map.getFloor(myLocation.fnum)
                var layer = new esmap.ESLayer(esmap.ESLayerType.IMAGE_MARKER);
                myLocationMarker = new esmap.ESImageMarker({
                x:myLocation.x,
                y:myLocation.y,   //如果不添加x和y，则默认坐标在地图中心。
                url: './assets/icons/curlocation.png',  //图片标注的图片地址
                size: 64,   			//图片大小 或者 size:{w:32,h:64},
                spritify:true,			//跟随地图缩放变化大小，默认为true，可选参数
                height:1,    			//距离地面高度
                showLevel: 20,  		//地图缩放等级达到多少时隐藏,可选参数
                seeThrough: true,		//是否可以穿透楼层一直显示,可选参数
                callback:function(){
                  myLocationMarker.alwaysShow();
                  myLocationMarker.jump({
                    times:5
                  });
                },
                //angle:30,  	//如果设置了就是固定marker角度，与地图一起旋转。(size需要重新设置)
                id: 2017,   			//id，可自定义
                name: 'myMarker'   		//name可自定义
                });
                layer.addMarker(myLocationMarker)
                floorLayer.addLayer(layer)
              }else{
                myLocationMarker.visible = true;
                myLocationMarker.moveTo({
                  x:myLocation.x,
                  y:myLocation.y,
                  callback:function(){
                    myLocationMarker.jump({
                    times:5
                  });
                  }
                })
              }
    }
    function focusToMyLocation(level){
      map.focusFloorNum ={ fnum:myLocation.fnum,callback:function(){
              map.moveTo({
                x:myLocation.x,
                y:myLocation.y,
                time:0.5,
                callback:function(){
                  map.scaleLevelTo(level,{
                    time:1
                  })
                }
              });
            }}
            map.visibleFloorNums = [myLocation.fnum];
    }
    function showRoutes(){
        var floorLayer = map.getFloor(3)
        var layer = new esmap.ESLayer(esmap.ESLayerType.IMAGE_MARKER)
        layer.name = 'routes';
        myLocationMarker&&(myLocationMarker.visible = false);
        var points = [
          {
            x:12629990.0572413,
            y:2580072.9431645,
            fnum:3
          },
          {
            x:12629985.2696807,
            y:2580127.3942602,
            fnum:3
          },
          {
            x:12630042.056728,
            y:2580127.1911906,
            fnum:3
          },
          {
            x:12630044.5801652,
            y:2580121.3191577,
            fnum:3
          },
          {
            x:12630055.1825344,
            y:2580142.1155252,
            fnum:3
          },
        ]
        // 12683438.7341726
        // 12683438.7341726
        points.forEach(function(p){
          var im = new esmap.ESImageMarker({
            x: p.x,
            y: p.y,   //如果不添加x和y，则默认坐标在地图中心。
            url: './assets/icons/inspection.png',  //图片标注的图片地址
            size: 70,   			//图片大小 或者 size:{w:32,h:64},
            spritify:true,			//跟随地图缩放变化大小，默认为true，可选参数
            height:2,    			//距离地面高度
            showLevel: 20,  		//地图缩放等级达到多少时隐藏,可选参数
            callback:function(){
              im.alwaysShow();
            },
            seeThrough: true,		//是否可以穿透楼层一直显示,可选参数
            //angle:30,  	//如果设置了就是固定marker角度，与地图一起旋转。(size需要重新设置)
            id: 2017,   			//id，可自定义
            name: 'myMarker'   		//name可自定义
        });
        layer.addMarker(im)
        })
        floorLayer.addLayer(layer)
        navi.queryByPoints(points)
        navi.drawNaviLine();
        map.panorama = true;

        setTimeout(function(){
          navi.simulate();
        },1000)
       
    }
        function initFnumPicker(){
            var selects = [];
            map.floorNums.forEach(function(fnum){
                var floor = map.getFloor(fnum)
                var floorDes = floor.floorAlias
                selects.push({
                    text:floorDes,
                    value:fnum
                })
            })
            var parent = document.getElementsByClassName('fnums-toggle')[0]
              //初始化picker
              picker = new Picker({
                data: [selects],
                selectedIndex: [0],
                title: '请选择楼层',
                parent:parent
            });
            picker.show();
            picker.on('picker.valuechange', function (selectedVal, selectedIndex) {
                });
            picker.on('picker.change', function (index, selectedIndex) {
              var fnum = map.floorNums[selectedIndex];
              var floor_ = map.getFloor(fnum)
              var floorDes_ = floor_.floorAlias
                if(map.visibleFloorNums.length != map.floorNums.length){
                    map.focusFloorNum = fnum
                    map.visibleFloorNums = [fnum]
                }else{
                    map.focusFloorNum = fnum
                }
                $('#fnumname').text(floorDes_)
                $('#fnum_toast').fadeIn(100);
                setTimeout(function(){
                  $('#fnum_toast').fadeOut(100)
                },800)
            });
        }
    </script>
</body>
</html>